﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using FukiERP.Product;
using FukiERP.Purchase;
using FukiERP.Supplier;

namespace FukiERP
{
    public partial class MasterForm : Telerik.WinControls.UI.RadForm
    {
        public MasterForm()
        {
            InitializeComponent();
        }

        private void mnu_ProductCategory_Click(object sender, EventArgs e) {
            OpenForm(new frm_ProductCategory());
        }

        private void ClearForms() {
            foreach(Form cform in this.MdiChildren){
                cform.Close();
            }
        }

        private void mnu_ProductList_Click(object sender, EventArgs e) {
            OpenForm(new frm_Product());
        }

        private void OpenForm(Form form) {
            ClearForms();
            form.MdiParent = this;
            form.Show();
        }

        private void _mnuProductBrand_Click(object sender, EventArgs e) {
            OpenForm(new FormProductBrand());
        }

        private void _mnuBrandModel_Click(object sender, EventArgs e) {
            OpenForm(new Form_ModelBrand());
        }

        private void _mnuModel_Click(object sender, EventArgs e) {
            OpenForm(new Form_Model());
        }

        private void mnu_Purchasing_Click(object sender, EventArgs e) {
            OpenForm(new frm_Purchasing());
        }

        private void mnu_Supplier_Click(object sender, EventArgs e) {
            OpenForm(new frm_Supplier());
        }

        private void _mnuSelling_Click(object sender, EventArgs e) {
            OpenForm(new Selling.SellingForm());
        }

        private void _mnuReportSelling_Click(object sender, EventArgs e) {
            OpenForm(new Report.SellingReportForm());
        }

        private void _mnuInvetoryReport_Click(object sender, EventArgs e) {
            OpenForm(new Report.InventoryReportForm());
        }
    }
}
